#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QInputDialog>
#include <QDebug>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    int res = QInputDialog::getInt(this, "整数输入对话框", "请输入一个整数");
    qDebug() << res;
}

void MainWindow::on_pushButton_2_clicked()
{
    double res2 = QInputDialog::getDouble(this, "浮点数对话框", "请输入一个浮点数");
    qDebug() << res2;
}

void MainWindow::on_pushButton_3_clicked()
{
    QStringList list;
    list.push_back("11111");
    QString string = QInputDialog::getItem(this, "条目输入对话框", "请输入一个条目", list);
    qDebug() << string;
}
